<include file="../header" />
<body class="J_scroll_fixed">
    <script type="text/javascript" src="__ROOT__/statics/js/ajaxfileupload.js"></script>
    <script type="text/javascript" src="__ROOT__/statics/js/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" src="__ROOT__/statics/js/ueditor/ueditor.all.min.js"></script>

    <script type="text/javascript">
        $(function () {

            $("button#send").click(function() {

                var cityName = $("input[name=cityName]").val();
                if(cityName == "") {
                    alert("门店名称不能为空");
                    return false;
                }

                var address = $("input[name=address]").val();
                if(address == "") {
                    alert("地址不能为空");
                    return false;
                }

//                $("form").submit();

            });

        });
    </script>
    <div class="wrap jj">
        <ul class="nav nav-tabs">
            <li><a href="{:U('shop/index')}">门店信息</a></li>
            <li class="active"><a href="{:U('shop/add')}">添加门店</a></li>
        </ul>

        <div class="common-form">
            <form  id='add' method="post" class="form-horizontal J_ajaxForm" action="{:U('shop/addPost')}">
                <fieldset>
                    <div class="control-group">
                        <label class="control-label">门店名称:</label>
                        <div class="controls">
                            <input type="text" class="input" name="shopName" value="">
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">地址:</label>
                        <div class="controls">
                            <input type="text" class="input" name="address" value="">
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">电话:</label>
                        <div class="controls">
                            <input type="text" class="input" name="contact" value="">
                        </div>
                    </div>
                </fieldset>

                <div class="form-actions">
                    <button id="send" type="button" class="btn btn-primary">添加</button>
                    <a class="btn" href="__URL__">返回</a>
                </div>
            </form>
        </div>
    </div>
    <script src="__ROOT__/statics/js/common.js"></script>
</body>
</html>